/*
 * Middleware
 * Copyright (C) 2010/11
 * Riccardo Pulvirenti, Giuseppe Ravidà, Andrea Tino
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANDABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses
 */

/*!
 * File: tqueue.hpp
 */

#ifndef _TASK_MANAGER_HPP_
#define _TASK_MANAGER_HPP_

#include "interface.hpp"
#include "task_descriptor.hpp"

//-----------------------------------------------------------------------------
// Interface definitions
namespace middleware {
/*! \class TaskManager
 * \brief Interface to let two Manager communicate.
 *
 * This interface defines methods in order to send and receive TaskDescriptor
 * between two Manager on two different peers.
 */
interface TaskManager {
public:
	/*!
	 * Sends a TaskDescriptor to a Manager on another peer.
	 * \param task TaskDescriptor to send.
	 */
	virtual void send_task(const TaskDescriptor& task) = 0;
	/*!
	 * Receives a TaskDescriptor from a Manager on another peer.
	 * \return Returns the received TaskDescriptor.
	 */
	virtual TaskDescriptor recv_task() = 0;
};
} /* middleware */

#endif
